package tglb;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;


@SuppressWarnings("serial")
public class HelloTag extends TagSupport {
	private String name = null;
	
	public void setName (String string) {
		this.name = string;
	}
	
	public int doStartTag() throws JspException {
		if (this.name==null)
			this.name = "tout le monde";
		try {
			pageContext.getOut().println ("Bonjour " + this.name + " !");
		} catch (IOException e) {
			throw new JspException ("I/O Error", e);
		}
		return SKIP_BODY;
	}
}

